
def main(event, context):
    try:
        # 获取随机图片URL
        image_url = "https://fastly.picsum.photos/id/890/800/600.jpg?hmac=mMCViMx0SaYJL2ohRmoUvsaNRrfisg7zEhehDHDXLoo"
        
    
      
        # 返回图片URL和描述
        return {
            "isBase64Encoded": False,
            "statusCode": 200,
            "headers": {
                "Content-Type": "application/json",
                "Access-Control-Allow-Origin": "*"
            },
            "body": {
                "imageUrl": image_url,
                "description": "这是一张随机获取的风景图片，展示了自然界的美丽景色。"
            }
        }
    except Exception as e:
        return {
            "isBase64Encoded": False,
            "statusCode": 500,
            "body": {
                "error": str(e)
            }
        }